//
//  PlatformFunctionCell.m
//  reSearchDemo
//
//  Created by 科技 on 15/8/1.
//  Copyright (c) 2015年 Kiwaro. All rights reserved.
//

#import "PlatformFunctionCell.h"

@interface PlatformFunctionCell(){
    UIImageView *_IconImageView;
    UILabel *_textLabel;
}

@end

@implementation PlatformFunctionCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _IconImageView = [[UIImageView alloc] initWithFrame:CGRectMake(20, 10, 30, 30)];
        [self.contentView addSubview:_IconImageView];
        
        _textLabel = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(_IconImageView.frame) + 10, CGRectGetMinY(_IconImageView.frame), 100, 30)];
        
        [self.contentView addSubview:_textLabel];
    }
    
    return self;
}

-(void)setModel:(NSMutableDictionary *)model {
//    _IconImageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"%@",model[@"image"]]];
    _IconImageView.image = [UIImage imageNamed:@"SessionBarIcon0.png"];
    
    _textLabel.text = model[@"text"];
    
    _height = 10 + CGRectGetWidth(_IconImageView.frame) + 10;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
